<?php
	session_start();
	//error_reporting(0);// turn off errors on release
    $settings = parse_ini_file('troll.ini',true);
    require 'includes/dbconnect.php';
    require 'includes/functions.php';
	
	/**
	 * TODO: ADD PAGE SECURITY CHECK FOR PPL THAT HARDCODE URLS
	 * */

 ?>

 <html>
		<head>
    		<link rel="stylesheet" type="text/css" href="scripts/troll.css"/>
    		<title>TROLL: Characater Creation</title>

    		<script src="scripts/hotkeys.js" type="text/javascript"></script>
    		<script type="text/javascript">
        		shortcut.add("b",function() {window.location.assign("bank.php");});
    		</script>
		</head>
		<body>
    		<center>
    		<div class="console">        
        		<table width="950" clas="console">
            		<tr>
                		<td>                
                    		<?php
                    			if(!isset($_GET['loc']))
                    			{
                    				include 'village.php';
                    			}
                    			else
                    			{
									/** *********************************************************
									 *   SPAWN CHILDREN PAGES
									 ** *********************************************************/
                    				switch($_GET['loc'])
                    				{
                    					//TODO START ADDING LOCATIONS
                    					case 'p' : include 'p_online.php';	break;
                    					case 'q' : include 'quit.php';	break;
										case 'b' : include 'bank.php';	break;
										case 's' : include 'shop.php';	break;
										case 'o' : include 'outskirts.php'; break;
                    				}
                    			}
                    		?>	                    		
							
						</td>
					</tr>	
				</table>
			</div>	
			</center>
		</body>	
		</html>	
 